package com.yanqu.road.entity.musicroom;

import com.alibaba.fastjson.JSONObject;
import com.yanqu.road.utils.property.Property;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class MusicRoomRoutingResult {
    private Map<Integer, MusicRoomRoutingBeauty> beautyMap = new HashMap<>();
    private Map<Integer, MusicRoomRoutingBuilding> buildingMap = new HashMap<>();

    /**
     * 美女路径,经过的建筑
     */
    private Map<Integer, List<List<Integer>>> beautyRoutingMap = new HashMap<>();

    /**
     * 美女路径,路线类型
     */
    private Map<Integer, List<Integer>> beautyRoutingTypeMap = new HashMap<>();

    public MusicRoomRoutingResult(List<MusicRoomRoutingBeauty> beautyDataList, Map<Integer, MusicRoomRoutingBuilding> buildingDataMap) {
        for (MusicRoomRoutingBeauty beautyData : beautyDataList) {
            beautyMap.put(beautyData.getBeautyId(), beautyData);
        }
        this.buildingMap = buildingDataMap;
    }

    public Map<Integer, MusicRoomRoutingBeauty> getBeautyMap() {
        return beautyMap;
    }

    public Map<Integer, MusicRoomRoutingBuilding> getBuildingMap() {
        return buildingMap;
    }

    public void setBeautyMap(Map<Integer, MusicRoomRoutingBeauty> beautyMap) {
        this.beautyMap = beautyMap;
    }

    public void setBuildingMap(Map<Integer, MusicRoomRoutingBuilding> buildingMap) {
        this.buildingMap = buildingMap;
    }

    public Property getAmountReward(){
        Property property = new Property();
        for (MusicRoomRoutingBuilding routingBuilding : buildingMap.values()) {
            property.addProperty(routingBuilding.getAmountReward());
        }
        return property;
    }

    public Map<Integer, List<List<Integer>>> getBeautyRoutingMap() {
        return beautyRoutingMap;
    }

    public void setBeautyRoutingMap(Map<Integer, List<List<Integer>>> beautyRoutingMap) {
        this.beautyRoutingMap = beautyRoutingMap;
    }

    public Map<Integer, List<Integer>> getBeautyRoutingTypeMap() {
        return beautyRoutingTypeMap;
    }

    public void setBeautyRoutingTypeMap(Map<Integer, List<Integer>> beautyRoutingTypeMap) {
        this.beautyRoutingTypeMap = beautyRoutingTypeMap;
    }

    //    getLogger().info("最近一次检测时辰={}", lastCheckTimeNumber);
//        for (Map.Entry<Integer, List<Integer>> entry : beautyRoutingChangeMap.entrySet()) {
//        Integer beautyId = entry.getKey();
//        List<Integer> jsonObjectList = entry.getValue();
//        getLogger().info("美女行程变化,beautyId={},routingList={}", beautyId, JSONObject.toJSONString(jsonObjectList));
//    }
}
